package com.jfinal.controller;

import com.jfinal.core.Controller;
import com.jfinal.model.auth.User;

/**
 * Created by xiaoyuan on 2018/1/9.
 */
public class HelloController extends Controller {
    public void index() {
       User user = User.dao.findById(1);
       System.out.println(user.getRoles());
       renderText("Hello "+user.get("name"));
    }
    public void  getJsp(){
        renderJsp("/index.jsp");
    }
    public void getJson(){
        renderJson("{\'haha\':\'xy\'}");
    }
    public void getTest(){
        renderCaptcha();
        renderText("test");
    }
    public void getEngine(){
        renderTemplate("testTemplate.html");
    }
}